package com.gdufe.common.feign;

import com.gdufe.common.utils.R;
import com.gdufe.common.vo.AddPointsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "mall-user")
public interface UserFeign {
    @GetMapping("/user/admin/getUser")
    public R getAdminUser();

    @GetMapping("/user/client/getUser")
    public R getClientUser();

    @GetMapping("/user/admin/{id}")
    public R adminSelectById(@PathVariable Long id);

    @GetMapping("/user/client/{id}")
    public R userSelectById(@PathVariable Long id);

    @RequestMapping("/user/client/addPoints")
    public R addPoints(@RequestBody AddPointsVo vo);

    @GetMapping("/user/admin/getUserByName")
    public R getUserByName(@RequestParam("name") String name);
}
